<?php
class CommentController extends CI_Controller {
	function __construct() {
		parent::__construct ();
		$this->load->model ( 'comment', '', TRUE );
	
	}
	function addComment() {
		$id_User = $_POST ['id_User'];
		$id_Obj = $_POST ['id_Obj'];
		$content = $_POST ['content'];
		$id_Comment = $this->comment->addComment ( $id_User, $id_Obj, $content );
		print $id_Comment;
	}
	function getComment() {
		$id = $_POST ['id_Obj'];
		$result = $this->comment->getComment ( $id );
		print(json_encode($result));
	}
}